﻿namespace Sys.Workflow.Image.Impl.Icon
{
	using org.apache.batik.svggen;
	using org.w3c.dom;

	public class TimerIconType : IconType
	{

		public override string FillValue
		{
			get
			{
				return "#585858";
			}
		}

		public override string StrokeValue
		{
			get
			{
				return "none";
			}
		}

		public override string DValue
		{
			get
			{
				return "M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20 10 C 20 4.4771525 15.522847 1.1842379e-15 10 0 z M 9.09375 1.03125 C 9.2292164 1.0174926 9.362825 1.0389311 9.5 1.03125 L 9.5 3.5 L 10.5 3.5 L 10.5 1.03125 C 15.063526 1.2867831 18.713217 4.9364738 18.96875 9.5 L 16.5 9.5 L 16.5 10.5 L 18.96875 10.5 C 18.713217 15.063526 15.063526 18.713217 10.5 18.96875 L 10.5 16.5 L 9.5 16.5 L 9.5 18.96875 C 4.9364738 18.713217 1.2867831 15.063526 1.03125 10.5 L 3.5 10.5 L 3.5 9.5 L 1.03125 9.5 C 1.279102 5.0736488 4.7225326 1.4751713 9.09375 1.03125 z M 9.5 5 L 9.5 8.0625 C 8.6373007 8.2844627 8 9.0680195 8 10 C 8 11.104569 8.8954305 12 10 12 C 10.931981 12 11.715537 11.362699 11.9375 10.5 L 14 10.5 L 14 9.5 L 11.9375 9.5 C 11.756642 8.7970599 11.20294 8.2433585 10.5 8.0625 L 10.5 5 L 9.5 5 z ";
			}
		}

        public override void drawIcon(int imageX, int imageYo, int iconPadding, ProcessDiagramSVGGraphics2D svgGenerator)
		{
			Element gTag = svgGenerator.DOMFactory.createElementNS(null, SVGGraphics2D.SVG_G_TAG);
			gTag.setAttributeNS(null, "transform", "translate(" + (imageX) + "," + (imageYo) + ")");

			Element pathTag = svgGenerator.DOMFactory.createElementNS(null, SVGGraphics2D.SVG_PATH_TAG);
			pathTag.setAttributeNS(null, "d", this.DValue);
			pathTag.setAttributeNS(null, "fill", this.FillValue);
			pathTag.setAttributeNS(null, "stroke", this.StrokeValue);
			gTag.appendChild(pathTag);
			svgGenerator.ExtendDOMGroupManager.addElement(gTag);
		}

		public override string AnchorValue
		{
			get
			{
				return null;
			}
		}

		public override string StyleValue
		{
			get
			{
				return null;
			}
		}

		public override int? Width
		{
			get
			{
				return 20;
			}
		}

		public override int? Height
		{
			get
			{
				return 20;
			}
		}

		public override string StrokeWidth
		{
			get
			{
				return null;
			}
		}
	}

}